3.1.8 \(\int \frac {a+b \tanh ^{-1}(c x)}{x^2} \, dx\) [8]

Optimal. Leaf size=36 \[ -\frac {a+b \tanh ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1-c^2 x^2\right ) \]

[Out]

(-a-b*arctanh(c*x))/x+b*c*ln(x)-1/2*b*c*ln(-c^2*x^2+1)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {6037, 272, 36, 29, 31} \begin {gather*} -\frac {a+b \tanh ^{-1}(c x)}{x}-\frac {1}{2} b c \log \left (1-c^2 x^2\right )+b c \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])/x^2,x]

[Out]

-((a + b*ArcTanh[c*x])/x) + b*c*Log[x] - (b*c*Log[1 - c^2*x^2])/2

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rubi steps

\begin {align*} \int \frac {a+b \tanh ^{-1}(c x)}{x^2} \, dx &=-\frac {a+b \tanh ^{-1}(c x)}{x}+(b c) \int \frac {1}{x \left (1-c^2 x^2\right )} \, dx\\ &=-\frac {a+b \tanh ^{-1}(c x)}{x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x \left (1-c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a+b \tanh ^{-1}(c x)}{x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} \left (b c^3\right ) \text {Subst}\left (\int \frac {1}{1-c^2 x} \, dx,x,x^2\right )\\ &=-\frac {a+b \tanh ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1-c^2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 39, normalized size = 1.08 \begin {gather*} -\frac {a}{x}-\frac {b \tanh ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1-c^2 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x])/x^2,x]

[Out]

-(a/x) - (b*ArcTanh[c*x])/x + b*c*Log[x] - (b*c*Log[1 - c^2*x^2])/2

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 50, normalized size = 1.39

method result size
derivativedivides \(c \left (-\frac {a}{c x}-\frac {b \arctanh \left (c x \right )}{c x}-\frac {b \ln \left (c x -1\right )}{2}+b \ln \left (c x \right )-\frac {b \ln \left (c x +1\right )}{2}\right )\) \(50\)
default \(c \left (-\frac {a}{c x}-\frac {b \arctanh \left (c x \right )}{c x}-\frac {b \ln \left (c x -1\right )}{2}+b \ln \left (c x \right )-\frac {b \ln \left (c x +1\right )}{2}\right )\) \(50\)
risch \(-\frac {b \ln \left (c x +1\right )}{2 x}+\frac {2 b c \ln \left (x \right ) x -b c \ln \left (c^{2} x^{2}-1\right ) x +b \ln \left (-c x +1\right )-2 a}{2 x}\) \(54\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))/x^2,x,method=_RETURNVERBOSE)

[Out]

c*(-a/c/x-b/c/x*arctanh(c*x)-1/2*b*ln(c*x-1)+b*ln(c*x)-1/2*b*ln(c*x+1))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 39, normalized size = 1.08 \begin {gather*} -\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} - 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \operatorname {artanh}\left (c x\right )}{x}\right )} b - \frac {a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/x^2,x, algorithm="maxima")

[Out]

-1/2*(c*(log(c^2*x^2 - 1) - log(x^2)) + 2*arctanh(c*x)/x)*b - a/x

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 47, normalized size = 1.31 \begin {gather*} -\frac {b c x \log \left (c^{2} x^{2} - 1\right ) - 2 \, b c x \log \left (x\right ) + b \log \left (-\frac {c x + 1}{c x - 1}\right ) + 2 \, a}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/x^2,x, algorithm="fricas")

[Out]

-1/2*(b*c*x*log(c^2*x^2 - 1) - 2*b*c*x*log(x) + b*log(-(c*x + 1)/(c*x - 1)) + 2*a)/x

________________________________________________________________________________________

Sympy [A]
time = 0.31, size = 41, normalized size = 1.14 \begin {gather*} \begin {cases} - \frac {a}{x} + b c \log {\left (x \right )} - b c \log {\left (x - \frac {1}{c} \right )} - b c \operatorname {atanh}{\left (c x \right )} - \frac {b \operatorname {atanh}{\left (c x \right )}}{x} & \text {for}\: c \neq 0 \\- \frac {a}{x} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))/x**2,x)

[Out]

Piecewise((-a/x + b*c*log(x) - b*c*log(x - 1/c) - b*c*atanh(c*x) - b*atanh(c*x)/x, Ne(c, 0)), (-a/x, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs. \(2 (34) = 68\).
time = 0.41, size = 94, normalized size = 2.61 \begin {gather*} {\left (b \log \left (-\frac {c x + 1}{c x - 1} - 1\right ) - b \log \left (-\frac {c x + 1}{c x - 1}\right ) + \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {c x + 1}{c x - 1} + 1} + \frac {2 \, a}{\frac {c x + 1}{c x - 1} + 1}\right )} c \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/x^2,x, algorithm="giac")

[Out]

(b*log(-(c*x + 1)/(c*x - 1) - 1) - b*log(-(c*x + 1)/(c*x - 1)) + b*log(-(c*x + 1)/(c*x - 1))/((c*x + 1)/(c*x -
 1) + 1) + 2*a/((c*x + 1)/(c*x - 1) + 1))*c

________________________________________________________________________________________

Mupad [B]
time = 0.70, size = 33, normalized size = 0.92 \begin {gather*} b\,c\,\ln \left (x\right )-\frac {a+b\,\mathrm {atanh}\left (c\,x\right )}{x}-\frac {b\,c\,\ln \left (c^2\,x^2-1\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))/x^2,x)

[Out]

b*c*log(x) - (a + b*atanh(c*x))/x - (b*c*log(c^2*x^2 - 1))/2

________________________________________________________________________________________